#ifndef __MEMPOOL_H
#define __MEMPOOL_H

#include <stdint.h>
#include <stdbool.h>
#include <assert.h>

#define MEM_BIG_POOL_CNT 16
#define MEM_BIG_ITEM_SIZE 256
#define MEM_SMALL_POOL_CNT 64
#define MEM_SMALL_ITEM_SIZE 64

#if !defined MEM_BIG_POOL_CNT || !defined MEM_BIG_ITEM_SIZE
#error "must define MEM_BIG_POOL_CNT and MEM_BIG_ITEM_SIZE"
#endif

#if !defined MEM_SMALL_POOL_CNT || !defined MEM_SMALL_ITEM_SIZE
#error "must define MEM_SMALL_POOL_CNT and MEM_SMALL_ITEM_SIZE"
#endif

typedef enum {
    MEM_POOL_TYPE_SMALL = 0,
    MEM_POOL_TYPE_BIG,
}MEM_POOL_TYPE_E;


#endif //__MEMPOOL_H
